import Vue from 'vue'
import App from './App.vue'
import VueRouter from 'vue-router';
import router from './router'
import store from './store'
import ElementUI from 'element-ui'; // 2.1引入结构
import 'element-ui/lib/theme-chalk/index.css'; // 2.2引入样式
import api from './api/index';
import axios from 'axios'; //引入axios
import './assets/css/main.css';
// import 'lib-flexible' //引入自适应
const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
    return originalPush.call(this, location).catch(err => err)
}
Vue.prototype.$axios = axios;
Vue.prototype.$api = api;

Vue.use(VueRouter); //使用路由
Vue.use(ElementUI); // 3.安装ElementUI
Vue.config.productionTip = false
Vue.use(axios); //使用axios
new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#app')